package com.miracle.flexAPI.api.mapper;

import com.miracle.flexAPI.api.dto.CacheUserDto;
import com.miracle.flexAPI.api.entity.CacheUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 用户表
 * @author Administrator
 */
@Mapper
//@CacheConfig(cacheNames = "user")
public interface CacheUserMapper {
    /**
     * 查询
     * @param dto
     * @return
     */
    //@Cacheable(key = "#p0")
    List<Map<String, Object>> selectUser(CacheUserDto dto);

    /**
     * 插入
     * @param model
     * @return
     */
    int insertUser(CacheUser model);

    /**
     * 更新
     * @param model
     * @return
     */
    //@CachePut(key="#p0")
    int updateUser(CacheUser model);

    /**
     * 删除
     * @param dto
     * @return
     */
    //@CacheEvict(key = "#p0")//,allEntries=true
    int deleteUser(CacheUserDto dto);
}
